.class public Les/d30;
.super Lcom/estrongs/fs/a;
.source "HttpFileObject.java"


# instance fields
.field private p:J

.field private q:J


# direct methods
.method public constructor <init>(Ljava/lang/String;Ljava/lang/String;)V
    .locals 2

    .line 24
    invoke-direct {p0, p2}, Lcom/estrongs/fs/a;-><init>(Ljava/lang/String;)V

    const-wide/16 v0, -0x1

    .line 25
    iput-wide v0, p0, Les/d30;->p:J

    .line 26
    iput-wide v0, p0, Les/d30;->q:J

    .line 27
    iput-object p1, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    return-void
.end method

.method constructor <init>(Ljava/lang/String;Lorg/apache/http/HttpResponse;)V
    .locals 4

    .line 1
    invoke-direct {p0, p1}, Lcom/estrongs/fs/a;-><init>(Ljava/lang/String;)V

    const-wide/16 v0, -0x1

    .line 2
    iput-wide v0, p0, Les/d30;->p:J

    .line 3
    iput-wide v0, p0, Les/d30;->q:J

    const-string v0, "Content-Disposition"

    .line 4
    invoke-interface {p2, v0}, Lorg/apache/http/HttpResponse;->getFirstHeader(Ljava/lang/String;)Lorg/apache/http/Header;

    move-result-object v0

    if-eqz v0, :cond_0

    .line 5
    invoke-interface {v0}, Lorg/apache/http/Header;->getValue()Ljava/lang/String;

    move-result-object v0

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    :goto_0
    const/4 v1, 0x0

    if-eqz v0, :cond_1

    const-string v2, "filename="

    .line 6
    invoke-virtual {v0, v2}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v2

    const/4 v3, -0x1

    if-eq v2, v3, :cond_1

    add-int/lit8 v2, v2, 0x9

    .line 7
    invoke-virtual {v0, v2}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    :try_start_0
    const-string v2, "iso-8859-1"

    .line 8
    invoke-virtual {v0, v2}, Ljava/lang/String;->getBytes(Ljava/lang/String;)[B

    move-result-object v0

    .line 9
    new-instance v2, Ljava/lang/String;

    invoke-direct {v2, v0}, Ljava/lang/String;-><init>([B)V

    iput-object v2, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception v0

    .line 10
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 11
    :goto_1
    iget-object v0, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->charAt(I)C

    move-result v0

    const/16 v2, 0x22

    if-ne v0, v2, :cond_1

    .line 12
    iget-object v0, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v2

    const/4 v3, 0x1

    sub-int/2addr v2, v3

    invoke-virtual {v0, v3, v2}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    .line 13
    :cond_1
    iget-object v0, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    if-nez v0, :cond_2

    .line 14
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->q0(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    .line 15
    :cond_2
    iget-object v0, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    if-nez v0, :cond_3

    .line 16
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->y(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Landroid/net/Uri;->decode(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    const/16 v0, 0x3f

    .line 17
    invoke-virtual {p1, v0}, Ljava/lang/String;->indexOf(I)I

    move-result p1

    if-ltz p1, :cond_4

    .line 18
    iget-object p1, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    invoke-virtual {p1, v0}, Ljava/lang/String;->indexOf(I)I

    move-result v0

    invoke-virtual {p1, v1, v0}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    goto :goto_2

    .line 19
    :cond_3
    iput-object v0, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    :cond_4
    :goto_2
    const-string p1, "Content-Length"

    .line 20
    invoke-interface {p2, p1}, Lorg/apache/http/HttpResponse;->getFirstHeader(Ljava/lang/String;)Lorg/apache/http/Header;

    move-result-object p1

    if-eqz p1, :cond_5

    .line 21
    invoke-interface {p1}, Lorg/apache/http/Header;->getValue()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Lcom/estrongs/android/util/o0;->d(Ljava/lang/String;)J

    move-result-wide v0

    iput-wide v0, p0, Les/d30;->p:J

    :cond_5
    const-string p1, "Last-Modified"

    .line 22
    invoke-interface {p2, p1}, Lorg/apache/http/HttpResponse;->getFirstHeader(Ljava/lang/String;)Lorg/apache/http/Header;

    move-result-object p1

    if-eqz p1, :cond_6

    .line 23
    invoke-interface {p1}, Lorg/apache/http/Header;->getValue()Ljava/lang/String;

    move-result-object p1

    invoke-static {p1}, Ljava/sql/Date;->parse(Ljava/lang/String;)J

    move-result-wide p1

    iput-wide p1, p0, Les/d30;->q:J

    :cond_6
    return-void
.end method


# virtual methods
.method public lastModified()J
    .locals 2

    .line 1
    iget-wide v0, p0, Les/d30;->q:J

    return-wide v0
.end method

.method public length()J
    .locals 2

    .line 1
    iget-wide v0, p0, Les/d30;->p:J

    return-wide v0
.end method

.method protected m()Lcom/estrongs/fs/l;
    .locals 1

    .line 1
    sget-object v0, Lcom/estrongs/fs/l;->d:Lcom/estrongs/fs/l;

    return-object v0
.end method

.method public setName(Ljava/lang/String;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/fs/a;->d:Ljava/lang/String;

    return-void
.end method
